package com.design.pattern.factory.demo;

import com.design.pattern.factory.ShapeFactory0;
import com.design.pattern.factory.service.Shape;

public class FactoryPatternDemo {

    public static void main(String[] args) {

        new Thread(()->{
            System.out.println(Thread.currentThread().getName()+" HIHI");
        }).start();

        ShapeFactory0 shapeFactory = new ShapeFactory0();

        Shape shape1 = shapeFactory.getShap("CIRCLE");
        shape1.draw();

        Shape shape2 = shapeFactory.getShap("RECTANGLE");
        shape2.draw();

        Shape shape3 = shapeFactory.getShap("SQUARE");
        shape3.draw();

    }
}
